package ltd.newbee.mall.service;

import ltd.newbee.mall.api.mall.vo.NewBeeMallOrderDetailVO;
import ltd.newbee.mall.api.mall.vo.NewBeeMallOrderItemVO;
import ltd.newbee.mall.api.mall.vo.NewBeeMallShoppingCartItemVO;
import ltd.newbee.mall.entity.*;

import java.util.List;

public interface NewBeeMallOrderService {
    /**
     * 获取订单详情
     */
    NewBeeMallOrderDetailVO getOrderDetailByOrderId(Long orderId);

    /**
     * 获取订单详情
     */
    NewBeeMallOrderDetailVO getOrderDetailByOrderNo(String orderNo, Long userId);

    /**
     * 我的订单列表
     */
    PageResult getMyOrders(PageQuery pageQuery);

    /**
     * 手动取消订单
     */
    String cancelOrder(String orderNo, Long userId);

    /**
     * 确认收货
     */
    String finishOrder(String orderNo, Long userId);

    String paySuccess(String orderNo, int payType);

    String saveOrder(MallUser loginMallUser, MallUserAddress address, List<NewBeeMallShoppingCartItemVO> itemsForSave);

    /**
     * 后台分页
     */
    PageResult getNewBeeMallOrdersPage(PageQuery pageQuery);

    /**
     * 订单信息修改
     */
    String updateOrderInfo(NewBeeMallOrder newBeeMallOrder);

    /**
     * 配货
     */
    String checkDone(Long[] ids);

    /**
     * 出库
     */
    String checkOut(Long[] ids);

    /**
     * 关闭订单
     */
    String closeOrder(Long[] ids);

    List<NewBeeMallOrderItemVO> getOrderItems(Long orderId);
}
